chore(atomic): add script / CI job to validate light DOM styles in Lit components#6807
chore(atomic): add script / CI job to validate light DOM styles in Lit components#6807fbeaudoincoveo merged 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a static analysis script and CI job to detect invalid :host CSS selectors in Lit components that use Light DOM (no Shadow DOM). The validation prevents a subtle bug where :host selectors in Light DOM components cause style leakage or misapplication since there's no shadow boundary.
Key changes:
- New validation script that recursively analyzes component files and imported styles for
:hostselectors in Light DOM components - CI workflow integration to run validation on every build
- npm script entry for local validation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/atomic/scripts/check-light-dom-host-selectors.mjs | New validation script that detects :host selectors in LightDomMixin and ItemSectionMixin components, including imported styles |
| packages/atomic/package.json | Adds validate:light-dom-styles npm script to run the validation |
| .github/workflows/ci.yml | Adds validate-light-dom-styles CI job that runs after build step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@fbeaudoincoveo I've opened a new pull request, #6811, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@fbeaudoincoveo I've opened a new pull request, #6812, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
…ts CI job (#6812) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
https://coveord.atlassian.net/browse/KIT-5334
#6806